<?php
	// Load Menu
	$this->template->menu('home');
?>

<div id="container">
	<?php echo form_open('perfil/save'); ?>
			<?php echo validation_errors('<p>','</p>'); ?>
		<table class="table_form">
	    	<tr>
	            <td>
	            	<?php echo form_label('Nome*', 'nome'); ?>
	            </td>
	            <td>
	            	<?php echo form_input('nome', $nome); ?>
	            </td>
	        </tr>
	        <tr>
	            <td>
	            	<?php echo form_label('Login*', 'username'); ?>
	            </td>
	            <td>
	            	<?php echo form_input('username', $username); ?>
	            </td>
	        </tr>
	        <tr>
	            <td>
	            	<?php echo form_label('Email*', 'email'); ?>
	            </td>
	            <td>
	            	<?php echo form_input('email', $email); ?>
	            </td>
	        </tr>
	        <tr>
	            <td>
	            	<?php echo form_label('Senha*', 'password'); ?>
	            </td>
	            <td>
	            	<?php echo form_password('password', $password, 'id="password"'); ?>
	            </td>
	        </tr>
	        <?php if($this->session->userdata('perfil') == '0'){ ?>
		        <tr>
		            <td>
		            	<?php echo form_label('Perfil', 'perfil'); ?>
		            </td>
		            <td>
		            	<?php echo form_dropdown('perfil', $perfil_list, $perfil); ?>
		            </td>
		        </tr>
	        <?php } ?>
	        <tr>
	            <td colspan="2">
	            <?php if (isset($id)) echo form_hidden('id', $id); ?>
	            <div class="form-save-buttons">
	                <?php echo form_submit('save', 'Save', 'class="btn-blue"'); ?>
	                <?php echo form_button('cancel', 'Cancel', 'class="btn-blue" onClick="history.go(-1)"'); ?>
	            </div>
	            </td>
	        </tr>
	    </table>
    <?php echo form_close(); ?>
</div>